package com.dgty.dg_common.widget.rv.adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Title: CompatTabAdapter$
 * Description:
 * <p>
 * Created DateTime: 2023/2/16$ 9:59$
 * Created by cacif$.
 */
public class CompatTabAdapter  extends FragmentPagerAdapter {

    private List<Fragment> mFragments;

    public CompatTabAdapter(FragmentManager fm, List<Fragment> fragments){
        super(fm);
        mFragments = fragments;
    }

    @Override
    public Fragment getItem(int i) {
        return mFragments.get(i);
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }

    @Override
    public int getItemPosition(@NonNull Object object) {
        return POSITION_NONE;
    }

}
